
@extends('admin._layouts.default')

@section('main')

            <ol class="breadcrumb">
              <li><a href="login-index.html">首页</a></li>
              <li><a href="#">功能</a></li>
              <li class="active">菜单设置</li>
            </ol>
           <div style="">
           <a href="{{ route('admin.menus.create') }}" class="btn btn-primary" role="button" style="margin-right:5px;">添加</a>
           <a href="#" class="btn btn-default" role="button">删除</a>
           <a href="{{ route('admin.menus.send') }}" class="btn btn-danger" role="button">生成微信自定义菜单</a></div>
              <div class="function_group">
            <table class="table table-bordered table-hover table-striped">
                	<tr>
                    	<td>&nbsp;</td>
                        <td>菜单名</td>
                        <td>关联关键词</td>
                        <td>关联URL</td>
                        <td>排序号</td>
                        <td>操作</td>
                    </tr>
                    @foreach($mymenus as $menu)
                	<tr>
                    	<td>
                      	</td>
                        <td style="text-align: left">{{ $menu['title']}}</td>
                        <td>{{ $menu['keyword']}}</td>
                        <td><textarea disabled>{{ $menu['url']}}</textarea></td>
                        <td>{{ $menu['sort']}}</td>
                        <td><a href="{{ route('admin.menus.edit',$menu['id']) }}" class="btn btn-primary" role="button" style="margin-right:5px;">修改</a>
                        <a href="{{ route('admin.menus.delete', array('id' => $menu['id'])) }}" class="btn btn-default" role="button">删除</a></td>
                    </tr>
                    @endforeach
           </table>
          </div>
@stop


@section('modals')

<div id="confirm_alert" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 class="modal-title" id="myModalLabel">确定本次操作吗？</h3>
      </div>
      <div class="modal-body">
        <i class=" icon-warning-sign color_red pull-left fs_24"></i>

        <p>一旦【确定】，本次操作不可撤销。</p>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary">确定</button>
      </div>
    </div>
  </div>
</div>
@stop


@section('script')
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/full-calendar/fullcalendar.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/jquery.peity.min.js') }}"></script>
<script type="text/javascript" language="javascript" src="{{ URL::asset('ad/js/plugins/datatables/js/jquery.dataTables.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/chosen/chosen/chosen.jquery.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/flot/jquery.flot.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/jquery.uniform.min.js') }}"></script>
<script src="{{ URL::asset('ad/js/plugins/justGage.1.0.1/resources/js/raphael.2.1.0.min.js') }}"></script>
<script src="{{ URL::asset('ad/js/plugins/justGage.1.0.1/resources/js/justgage.1.0.1.min.js') }}"></script>
<script src="{{ URL::asset('ad/js/scripts.js') }}"></script>


    <script type="text/javascript" charset="utf-8">
    // Datatables
    $(document).ready(function() {
      var dontSort = [];
                $('#datatable_city thead th').each( function () {
                    if ( $(this).hasClass( 'no_sort' )) {
                        dontSort.push( { "bSortable": false } );
                    } else {
                        dontSort.push( null );
                    }
      } );
      $('#datatable_city').dataTable( {
        "sDom": "<'row table_top_bar'<'row-fluid'>'<'to_hide_phone'>'f'<'>r>t<'row'>",
         "sDom": "<'row table_top_bar'<'row-fluid'<'to_hide_phone' f>>><'row'>",
         "aaSorting": [[ 1, "asc" ]],
        "bPaginate": false,
        "bJQueryUI": false,
        "aoColumns": dontSort

      } );
      $.extend( $.fn.dataTableExt.oStdClasses, {
        "s`": "dataTables_wrapper form-inline"
      } );
    } );
    </script>
@stop
